<?php
session_start();
$user = isset($_SESSION["user"])?$_SESSION["user"]:null;
if(!$user){
    echo "未登陆，请先去<a href='login.html'>登陆</a>。";
}else{
    echo "<!DOCTYPE html>";
    echo "<html>";
?>
    <head>
            <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
        <title>网页</title>
    </head>
    <body>
    <h3>新建文章</h3>
        <form method="POST" action="article_add_do.php">
            <div>
                <label>标题</label>
                <input type="text" name="Title" id="Title"/>

            </div>
            <div>
                <label>内容</label>
                <textarea name="Content" id="Content" cols="80" rows="20"></textarea>
            </div>
            <div>
                <label>作者德国电视公司的</label>
                <span>
                    <?php echo $user["username"]?>
                </span>
            </div>
            <div>
                <input type="submit" value="提交"/>
                <input type="reset" value="重置"/>
            </div>
        </form>
    </body>
</html>

<?php }?>